package cat.joronya.supermanager.europeo.service;

import android.os.Message;
import android.util.Log;
import cat.joronya.supermanager.europeo.Supermanager;

/**
 * PrivateLeague Handler which handles different status on abstract methods:
 * -privateLeagueParsed method to handle PRIVATE_LEAGUES_PARSED_OK
 * 
 * @author pol
 *
 */
public abstract class PrivateLeagueHandler extends BaseHandler 
{
	@Override 
    public void handleMessage(Message msg)
    { 
        //get data from msg 
        status = msg.getData().getInt(Supermanager.STATUS_MESSAGE);
        Log.d(TAG, "MarketHandler received status: "+status);
        
        if( status == Supermanager.PRIVATE_LEAGUES_PARSED_OK )
        {
        	privateLeagueParsed();
        }
        
        super.handleMessage(msg);
    }
	
	/**
	 * Executed when received PRIVATE_LEAGUES_PARSED_OK
	 */
	public abstract void privateLeagueParsed();
}
